JavaScript

{dialog.object}_listFetchRecordsByKey Method

Syntax

{dialog.object}._listFetchRecordsByKey(listId,keys);

Arguments

listIdstring

The name of the List control.

keysstring

The primary key value of the record.

Description

Appends records to the end of the list.

The records to append are specified by their primary key values. You can fetch one or more records. In the case where the List is based on a SQL datasource, the list must be configured to return the Primary Key of the table.

Example

Fetch the record that has a primary key of 'ALFKI' and append it to the list.

{dialog.object}._listFetchRecordsByKey('MYLIST1','ALFKI');

If you want to fetch more than one record, enter an array of key values.

{dialog.object}._listFetchRecordsByKey('MYLIST1','ALFKI','BOLID');

In the case where the primary key is based on more than one column, the key segments are separated by '|||'.

{dialog.object}._listFetchRecordsByKey('MYLIST1',['John|||Smith','Terry|||Jones']);

In the case of .dbf tables, the 'keys' are the record number of the records you want to fetch.

{dialog.object}._listFetchRecordsByKey('MYLIST1','23','57');

See Also